package com.itheima;

import java.io.IOException;
import java.net.Socket;

/**
 * @auther Macrydy
 * @date 2020/7/10 22:55
 */
public class TcpTest {
    public static void main(String[] args) throws IOException {
        //创建客户端的Socket对象(Socket)
        //Socket(String host, int port) 创建流套接字并将其连接到指定主机上的指定端口号
        Socket s = new Socket("127.0.0.1",10300);
        TcpClient tcpClient = new TcpClient(s);
        new Thread(tcpClient).start();
//        new Thread(tcpClient).start();
//        new Thread(tcpClient).start();
    }
}
